/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.click.app.dao.hibernate;

import com.click.app.dao.ProcessDressmakerDao;
import com.click.app.model.Employee;
import com.click.app.model.ProcessDressmaker;
import java.util.List;

/**
 *
 * @author ronald
 */
public class ProcessDressmakerDaoHibernate  extends GenericDaoHibernate<ProcessDressmaker, Long> implements ProcessDressmakerDao {

    public ProcessDressmakerDaoHibernate() {
        super(ProcessDressmaker.class);
    }
    public List<ProcessDressmaker> getProcessDressmakers(){

        return getHibernateTemplate().find("from ProcessDressmaker pdm");
        
    }

    public List<ProcessDressmaker> findByEmployeePay(Employee employee) {
        return getHibernateTemplate().find("from ProcessDressmaker where employee=? AND totalCurrentAmount>0 order by endDate", employee);
    }
}
